1. Field of the Invention
The invention relates to a semiconductor apparatus for data processing being provided with read only memory for holding control codes, more particularly, to a semiconductor apparatus for data processing capable of reading out control codes to its outside.
2. Description of Related Art
In a semiconductor apparatus obtained by configuring data processor on one chip, or in a so called one chip microcomputer, such a method that an actual data processing inside thereof is performed by an aggregate of control codes called a microprogram, is widely adopted.
FIG. 1 is a block diagram showing essential parts of one configuration example of a conventional semiconductor apparatus for data processing provided with a read only memory for holding such control codes.
In FIG. 1, reference numeral 301 designates a read only memory (hereinafter, to be called .mu.-ROM) for holding control codes, that is, microcodes (hereinafter, to be called .mu.-code). Some of the U-codes stored in this .mu.-ROM 301 are combined to compose a microprogram routine.
In addition, the bit length of the .mu.-code is assumed to be 128 bits in this example.
Numeral 302 designates a .mu.-address register. The .mu.-address register 302 holds a position in the .mu.-ROM 301 of a .mu.-code to be read next from the .mu.-ROM 301, that is, an address (hereinafter to be called .mu.-address) showing a reading position. The .mu.-address held in this .mu.-address register 302 is given from a selector 303.
The bit length of the .mu.-address is assumed to be 12 bits in this example.
The selector 303 selects the .mu.-address to be read next according to a sequence of the .mu.-codes. To the selector 303, an address signal line 300 of 12 bits, a .mu.-stack register 304 of 12 bit width to be described later, and a signal line 310 to which a system reset signal SRS is given, are connected. Accordingly, the selector 303 is also of 12-bit width.
The selector 303 usually selects the address given from the address signal line 300 according to the sequence of the .mu.-codes, however, in case of returning from the case of branching to subroutine, it selects a value which is stored in the .mu.-stack register 304. And when the system reset signal SRS given from the signal line 310 becomes an effective value, the selector 303 selects "h'000" (here h' represents hexadecimal number) as a .mu.-address.
Numeral 305 designates an incrementer. In the case where the sequence of the .mu.-codes branches to a sub routine, the incrementer 305 increments the .mu.-address outputted from the .mu.-address register 302 by "+1" and makes the aforementioned .mu.-stack register 304 store it. Accordingly, in this case, in the .mu.-stack register 304, a .mu.-address next to the .mu.-address of the .mu.-code which has generated branch, that is, so-called return .mu.-address is stored.
The incrementer 305 is also of 12-bit width.
Numeral 306 designates a .mu.-output register of 128-bit width. The .mu.-output register 306 holds temporarily the .mu.-code outputted from the .mu.-ROM 301.
Numeral 307 designates a .mu.-decoder. The .mu.-decoder 307 decodes the .mu.-code held in the aforementioned .mu.-output register 306.
Numeral 308 designates a arithmetic units executing various kinds of operations, operand address calculation, and the like by being controlled by codes outputted responsive to the decode result done by the aforementioned .mu.-decoder 307. Numeral 309 designates an operand address register holding operand address in case of executing operand data accessing to the outside of the semiconductor apparatus.
The bit length of data outputted from the arithmetic units 308 is 16 bits, and accordingly, that of the operand address register 309 is also of 16-bit width.
In addition, in the conventional semiconductor apparatus for data processing shown in FIG. 1, the bit length of the .mu.-code outputted from the .mu.-ROM 301 is 128 bits, the bit length of the .mu.-address inputted to the .mu.-ROM 301 is 12 bits, the bit-width of the output data of the arithmetic units 308 is 16 bit and the operated address register 309 is of 16 bits, however, these bit numbers are merely an example. The point to be noted here is that, the bit length of an instruction code used in a usual microcomputer is generally 8 or 16 bits, while the bit, length of the .mu.-code outputted from the .mu.-ROM 301 is very large, for example, 128 bits as shown in the conventional example of FIG. 1.
Next, explanation will be given on an operation of the conventional semiconductor apparatus for data processing of such a configuration as aforementioned.
The selector 303 selects the .mu.-address of the .mu.-code to be read next from the .mu.-ROM 301 responsive to a state of data processing at that time and outputs it to the .mu.-address register 302. Usually, the selector 303 selects the .mu.-address given from the address signal line according to the sequence of the .mu.-codes and outputs it.
The .mu.-address outputted from the selector 303 is stored in the .mu.-address register 302. The .mu.-address stored in the .mu.-address register 302 is inputted to the .mu.-ROM 301, and the .mu.-code specified by that .mu.-address is outputted from the .mu.-ROM 301. The .mu.-code outputted from the .mu.-ROM 301 is stored in the .mu.-output register 306, and further given to the .mu.-decoder 307 so as to be decoded. By the code outputted from the .mu.-decoder 307 responsive to the decode result done by the .mu.-decoder 307, the arithmetic units 308 is controlled.
By the way, in the .mu.-addresses to be selected by the selector as a U-code to be read next from the .mu.-ROM 301, there is a return .mu.-address, at the time of returning from the state of branching to a sub routine to the prior routine. In this case, the .mu.-address stored in the .mu.-stack register 304 is selected. The .mu.-stack register 304 stores a value obtained by incrementing the .mu.-address outputted at that time point by the .mu.-address register 302 at the time of branching to the sub routine by "+1" by the incrementer 305. Accordingly, in the .mu.-stack register 304, since a .mu.-address corresponding to the .mu.-code next to the .mu.-code which has generated branch, that is, a return .mu.-address is stored, the processing can be returned to the routine before branching by that the selector 303 selects the above fact.
When the system reset signal SRS becomes an ineffective value, the selector 303 selects a .mu.-address "h'000" corresponding to the .mu.-code for executing a system reset sequence.
Further, during the semiconductor apparatus for data processing is operating, there is a case that operand data accessing is performed to the outside. In this case, an operand address necessary for operand data accessing is calculated by the arithmetic units 308 and is stored in the operand address register 309. The operand address stored in the operand address register 309 is outputted to the outside of the semiconductor apparatus for data processing through a route (not shown), and by, for example, accessing an external memory or the like, operand data accessing is performed.
The conventional semiconductor apparatus for data processing being provided with the .mu.-ROM 301 (read only memory) for holding .mu.-codes (control codes) is so configured as the above, and generally is not provided with a route for reading the .mu.-code outputted from the .mu.-ROM 301 to the outside of the semiconductor apparatus directly. Therefore, there has been a problem that it is very difficult to evaluate and analyze, for example, whether the semiconductor elements configuring the .mu.-ROM 301 have been normally formed in manufacturing a semiconductor apparatus for data processing.
In order to perform such evaluation and analysis, it is necessary to configure so that the .mu.-code outputted from the .mu.-ROM 301 can be read directly to the outside of the semiconductor apparatus by providing pads in the periphery of the semiconductor apparatus and further providing output routes (wiring) separately from the .mu.-ROM 301 to the pads. But generally since the bit length of the .mu.-code outputted from the .mu.-ROM is long, there has been a problem that a very large area for wiring and pads is necessary for wiring between the .mu.-ROM 301 and the pad.